<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>propsData</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>

<body>
    <h1> 选项 propsData</h1>
    <a href="../index.html">返回</a>
    <hr />
    <header></header>
    <script type="text/javascript">
        var header_a = Vue.extend({
            template: `<p>{{message}}-{{a}}</p>`,
            data: function () {
                return {
                    message: "Hello,I am Header"
                }
            },
            props: ['a']
        });
        new header_a({ propsData: { a: 'zhangsande' } }).$mount('header');
    </script>
</body>

</html>